
package cn.Llist;

//import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;

public class Test {
  
	public static void main(String[] args){	
	 List<Student> list =new LinkedList<Student>();	
	 //List<Student> list2 =new ArrayList<Student>();
	 list.add(new Student("zhang3",13));
	 list.add(new Student("li4",14));
	 list.add(new Student("wang5",15));
	 list.add(new Student("wang5",15));
	 System.out.println(list.size());
	 Iterator<Student> iter=list.iterator();
	 while(iter.hasNext()){
		Student stu= iter.next();
		System.out.println(stu.getName());
	 }
 }	
	
}
